package javaLearning.异常;

import java.util.*;

/**
 * @author : K k
 * @date : 12:49 2020/8/22
 */

class Annoyance extends Exception {
}

class Sneeze extends Annoyance {
}

public class ExceptionDemo {

    public static void main(String[] args) {

        Queue<String> queue=new LinkedList<>();

        try {
            try {
                throw new Sneeze();
            } catch (Annoyance a) {
                System.out.println("Caught Annoyance");
                throw a;
            }
        } catch (Sneeze s) {
            System.out.println("Caught Sneeze");
            return;
        } finally {
            System.out.println("Hello World!");
        }

    }
}